INSTRUCTIONS:

  • Follow the instructions on the stage to complete this interactive learning activity.
  • Look out for key terms marked with a ★!
  • Sometimes you will have to complete a task on the stage to continue. Pay attention!
  • Cybersecurity Careers: Use these websites to explore various careers in cybersecurity!
  • At the end of the activity click Submit and Next to move on!

To navigate the page using the TAB key, first press ESC to exit the code editor.

import codesters import random from codesters.demo import Demo from codesters import Text # Set constants stage_height = float(stage.get_stage_height()) stage_width = float(stage.get_stage_width()) offstage_below = -1000 # Use as y value to create objects below the stage wait_time = 1 # Create Demo instance demo = Demo() # Set up stage stage.auto_cache_off() stage.set_background_color("black") stage.disable_floor() chars = [] for counter in range(60): x = random.randint(-550, 550) binary = codesters.Text(chr(random.randint(33, 255)), x, 300, "green") binary.set_y_speed(random.randint(-3, -1)) binary.set_physics_on() binary.set_opacity(random.random()) chars.append(binary) def interval(): for char in chars: if char.get_y() <= -(stage_height/2): char.go_to(random.randint(-550, 550), 310) char.set_y_speed(random.randint(-3, -1)) # char.set_opacity(random.randint(1,10)/10) stage.event_interval(interval, 0.05) lesson_title = Text("Cybersecurity: Introduction", 0, 200, "white") lesson_title.set_text_width(800) lesson_title.set_text_size(40) activity_title = Text("Future of Cybersecurity", 0, 150, "white") activity_title.set_text_width(600) activity_title.set_text_size(30) stage.wait(wait_time*1) guide = demo.create_sprite_off_screen("person20", -stage_width/2-50, -150, 1) guide.move_forward(stage_width/2+50) demo.continue_action() lesson_title.set_speed(10) lesson_title.glide_to(0, 1000) activity_title.set_speed(10) activity_title.glide_to(0, 1000) demo.remove_all_sprites_except([guide]+chars) guide_text = codesters.Text(" Cybersecurity is a big - and growing! - field. \n\n\n\n\n", 0, 150) guide_text.set_text_background("silver", "white", 1) guide_text.set_text_height(25) guide_text.set_text_size(22) guide_text.set_text_width(700) stage.wait(wait_time*2) guide_text.set_text(" Cybersecurity is a big - and growing! - field. \nMore and more of our lives now live on computers and online:\n\n\n\n") stage.wait(wait_time*2) guide_text.set_text(" Cybersecurity is a big - and growing! - field. \nMore and more of our lives now live on computers and online:\nschooling, banking, shopping, gaming, chatting with friends...\n\n\n") stage.wait(wait_time*2) guide_text.set_text(" Cybersecurity is a big - and growing! - field. \nMore and more of our lives now live on computers and online:\nschooling, banking, shopping, gaming, chatting with friends...\nThese activities require access, privacy, and trust.\n\n") stage.wait(wait_time*2) guide_text.set_text(" Cybersecurity is a big - and growing! - field. \nMore and more of our lives now live on computers and online:\nschooling, banking, shopping, gaming, chatting with friends...\nThese activities require access, privacy, and trust.\nI need to know that ONLY my doctor can see my health records,\n") stage.wait(wait_time*2) guide_text.set_text(" Cybersecurity is a big - and growing! - field. \nMore and more of our lives now live on computers and online:\nschooling, banking, shopping, gaming, chatting with friends...\nThese activities require access, privacy, and trust.\nI need to know that ONLY my doctor can see my health records,\nmy social media can't be hacked, and that my bank account is secure!") stage.wait(wait_time*2) demo.continue_action() guide_text.set_text(" Cybersecurity is also a matter of national security. \n\n\n\n\n\n") stage.wait(wait_time*2) guide_text.set_text(" Cybersecurity is also a matter of national security. \nIt's not just our personal lives that are online,\n\n\n\n\n") stage.wait(wait_time*2) guide_text.set_text(" Cybersecurity is also a matter of national security. \nIt's not just our personal lives that are online,\nit's our schools, government, utilities, and even military.\n\n\n\n") stage.wait(wait_time*2) guide_text.set_text(" Cybersecurity is also a matter of national security. \nIt's not just our personal lives that are online,\nit's our schools, government, utilities, and even military.\n\nWhat does this mean for you?\n\n") stage.wait(wait_time*2) guide_text.set_text(" Cybersecurity is also a matter of national security. \nIt's not just our personal lives that are online,\nit's our schools, government, utilities, and even military.\n\nWhat does this mean for you?\nCareers in cybersecurity are growing quickly,\n") stage.wait(wait_time*2) guide_text.set_text(" Cybersecurity is also a matter of national security. \nIt's not just our personal lives that are online,\nit's our schools, government, utilities, and even military.\n\nWhat does this mean for you?\nCareers in cybersecurity are growing quickly,\nand more positions open every day!") stage.wait(wait_time*2) demo.continue_action() guide_text.set_text(" What types of careers are there in cybersecurity? \n\n\n\n\n\n\n") stage.wait(wait_time*2) guide_text.set_text(" What types of careers are there in cybersecurity? \n\nCan you picture what a cybersecurity job looks like?\n\n\n\n\n") stage.wait(wait_time*2) guide_text.set_text(" What types of careers are there in cybersecurity? \n\nCan you picture what a cybersecurity job looks like?\n\nWe can group cybersecurity jobs in 3 big categories:\n\n\n") stage.wait(wait_time*2) guide_text.set_text(" What types of careers are there in cybersecurity? \n\nCan you picture what a cybersecurity job looks like?\n\nWe can group cybersecurity jobs in 3 big categories:\nBuilding computer systems,\n\n") stage.wait(wait_time*2) guide_text.set_text(" What types of careers are there in cybersecurity? \n\nCan you picture what a cybersecurity job looks like?\n\nWe can group cybersecurity jobs in 3 big categories:\nBuilding computer systems,\nAnalyzing and Testing computer systems,\n") stage.wait(wait_time*2) guide_text.set_text(" What types of careers are there in cybersecurity? \n\nCan you picture what a cybersecurity job looks like?\n\nWe can group cybersecurity jobs in 3 big categories:\nBuilding computer systems,\nAnalyzing and Testing computer systems,\nSecuring computer systems") stage.wait(wait_time*2) demo.continue_action() # guide_text.set_text("") # stage.wait(wait_time*2) # demo.continue_action() # "People are needed to design computer systems and programs that keep data and users secure." # "People are needed to test those systems and try to get to the data anyway. This is called pen-testing." # "There are careers in leading projects and people to help secure companies. You'll need some technical knownledge for this, as well as people skills!" # "Build, Analyse/Test, Secure" guide_text.hide() guide.hide() loading_text = codesters.Text("Loading", -40, 75, "white") loading_text.set_text_align("left") loading_sprite = demo.create_sprite_off_screen("codester", 0, 25, 0.6) intervals = 0 def loading_interval(): global intervals intervals += 1 loading_sprite.turn_right(90) if intervals % 4 == 0: loading_text.set_text("Loading") else: loading_text.set_text(loading_text.get_text() + ".") stage.event_interval(loading_interval, .25) loading_sprite.turn_right(90) loading_text.set_text(loading_text.get_text() + ".") teal_back = codesters.Rectangle(-348, offstage_below, 400, stage_height, "#16526b") hack_2 = demo.create_sprite_off_screen("teen_hacker_2", 170, offstage_below, 3.1) hack_1 = demo.create_sprite_off_screen("teen_hacker_1", -stage_width/3, offstage_below, 2.1) strike_1 = codesters.Rectangle(-153, offstage_below, 5, stage_height+50, "purple") hack_3 = demo.create_sprite_off_screen("teen_hacker_4", stage_width/3+5, offstage_below, 2.1) strike_2 = codesters.Rectangle(192, offstage_below, 5, stage_height+50, "teal") code_editor = codesters.Rectangle(194, offstage_below, 694, stage_height-4, "black", "chartreuse") code_editor.set_line_thickness(5) keep_stage_elements = [hack_2, hack_1, strike_1, hack_3, strike_2] demo.remove_all_sprites_except(keep_stage_elements + chars+[code_editor, guide_text, guide, teal_back]) coords = [170, -stage_width/3, -153, stage_width/3+5, 192, 194] for element in keep_stage_elements + [code_editor, teal_back]: element.hide() for element in keep_stage_elements + [code_editor, teal_back]: element.go_to(element.get_x(), 0) # Remove the loading screen stage.event_interval(None) stage.remove_sprite(loading_sprite) stage.remove_sprite(loading_text) # stage.event_interval(interval, None) for char in chars: char.set_y_speed(0) char.hide() for element in keep_stage_elements: element.show() left_clicked, mid_clicked, right_clicked = False, False, False def ready_click(): """ This function resets all the images, then checks if all images have been clicked. If so, it unpauses the stage """ global left_clicked, mid_clicked, right_clicked if left_clicked and mid_clicked and right_clicked: demo.remove_all_sprites_except([guide, guide_text] + chars) demo.unpause() stage_reset() def typing(type_list, start_y = 200): """" Types the information about each job """ mini_code_x = -130 mini_code_y = start_y mini_code_step = 28 last_index = len(type_list)-1 for index, item, in enumerate(type_list): if last_index == index: wait = True else: wait = False mini_console_text = demo.animate_typing_text('> ' + item, mini_code_x, mini_code_y-mini_code_step*index, font_size = 20, color = "limegreen", width = 650, cursor_wait=wait) stage.wait(wait_time*1) def custom_button(): text = "Next " + u"⇨" background_sprite = codesters.Circle(545, 0, 200, "#07A7E0") button = demo.create_button(text, 490, 0, True, "white", "#07A7E0", 90, 200, "white") demo.stage.remove_sprite(button.background_sprite) button.background_sprite = background_sprite demo.add_hover_opacity_element(button) button.hide() return button def caret_button(): text = "> Click to Continue_" button = demo.create_button(text, code_editor.get_x(), -50, False, "lightgreen", 50, 20, "") return button def stage_reset(): demo.remove_all_sprites_except(keep_stage_elements+chars+[code_editor, guide_text, guide, teal_back]) code_editor.hide() counter = 0 for element in keep_stage_elements: element.go_to(coords[counter], 0) counter += 1 for element in keep_stage_elements: element.show() def left_click(): hack_1.event_click(None) for element in keep_stage_elements: element.hide() hack_1.show() code_editor.show() demo.animate_typing_text('> ' + "Software Developer:", code_editor.get_x(), 250, align = "center", font_size = 30, color = "limegreen", cursor_wait=True) lines = ["A software developer is someone who writes computer software,", "or the programs and apps that you use on a computing device.", "Software developers might focus on making sure their program/app", "works and is easy to use, but increasingly, they need to think about", "security too! Their app must keep the users' data private and safe.", "Software development can lead to cybersecurity-specific careers,", "such as Penetration and Vulnerability Testing (Pen-Tests)", "Average Salary: $73,000"] typing(lines) stage.wait(wait_time*1) button = caret_button() button.event_click(left_click_finish) def left_click_finish(sprite): global left_clicked sprite.hide() demo.animate_typing_text('> ' + "Pen Tester:", code_editor.get_x(), -50, align = "center", font_size = 30, color = "limegreen", cursor_wait=True) lines = ["Pen testers are hackers (someone who accesses or uses a system", "in a way that was not originally intended) that are hired specifically", "to try to break and get around a company's security.", "If you are a creative systems thinker who likes to get around systems,", "this career is for you!", "Average Salary: $101,000"] typing(lines, -100) stage.wait(wait_time*4) left_clicked = True button = custom_button() button.show() button.event_click(ready_click) def mid_click(): hack_2.event_click(None) for element in keep_stage_elements: element.hide() hack_2.go_to(-200, 0) hack_2.show() code_editor.show() demo.animate_typing_text('> ' + "Network Engineer:", code_editor.get_x(), 250, align = "center", font_size = 30, color = "limegreen", cursor_wait=True) lines = ["Network engineers connect computers so they can send and get", "information from each other. Once computers can communicate,", "privacy and safety become big concerns! Network engineers ensure", "that computers can only send certain information", "and also that received information or instructions are safe!", "Network Engineering can lead to cybersecurity-specific careers,", "such as Incident & Intrusion Analysis.", "Average Salary: $79,000"] typing(lines) stage.wait(wait_time*1) button = caret_button() button.event_click(mid_click_finish) def mid_click_finish(sprite): global mid_clicked sprite.hide() demo.animate_typing_text('> ' + "Incident & Intrusion Analyst:", code_editor.get_x(), -50, align = "center", font_size = 30, color = "limegreen", cursor_wait=True) lines = ["Incident & Intrusion analysts monitor (keep an eye on) networks.", "They analyze the network for any weak spots that a hacker", "could exploit, and respond to hacking incidents.", "Average Salary: $87,000"] typing(lines, -100) stage.wait(wait_time*4) mid_clicked = True button = custom_button() button.show() button.event_click(ready_click) def right_click(): hack_3.event_click(None) for element in keep_stage_elements: element.hide() teal_back.show() hack_3.go_to(-348, 0) hack_3.show() code_editor.show() demo.animate_typing_text('> ' + "IT Support:", code_editor.get_x(), 250, align = "center", font_size = 30, color = "limegreen", cursor_wait=True) lines = ["IT support staff help users with their computers, programs, and", "peripherals (things like printers, scanners, copiers and more!)", "They might also be responsible for training users,", "and educating users about cyber risks and attacks.", "Users are often the weakest link in an organization's security,", "so IT staff are an important front line of defense!", "IT support can lead to jobs such as Cybersecurity Specialist.", "Average Salary: $52,000"] typing(lines) stage.wait(wait_time*1) button = caret_button() button.event_click(right_click_finish) def right_click_finish(sprite): global right_clicked sprite.hide() demo.animate_typing_text('> ' + "Cybersecurity Specialist:", code_editor.get_x(), -50, align = "center", font_size = 30, color = "limegreen", cursor_wait=True) lines = ["Cybersecurity specialists maintain organizational security.", "They monitor company systems and report issues, as well as", "thinking about future cyber threats and how to defend against them.", "They also educate and train other employees about cyber threats", "and how to keep the company's computers/network safe.", "Average Salary: $100,000"] typing(lines, -100) stage.wait(wait_time*4) right_clicked = True button = custom_button() button.show() button.event_click(ready_click) def hide_instructions(sprite): close_instructions.hide() sprite.hide() instructions.hide() hack_1.event_click(left_click) hack_2.event_click(mid_click) hack_3.event_click(right_click) instructions = codesters.Text("", 0, 25, "white") instructions.set_text_background("black", "pink", .8) instructions.set_line_thickness(3) instructions.set_text_width(10000) instructions.set_text_size(30) instructions.set_text("Click each picture\nto learn more about different cybersecurity careers!\n\nClick the red x to the left to close these instructions") text = u"Ⓧ" close_instructions = demo.create_button(text, instructions.get_left()+10, instructions.get_top()-10, True, "red", "black", 20, 20, "") close_instructions.event_click(hide_instructions) demo.pause() for char in chars: char.show() char.set_y_speed(random.randint(-3, -1)) stage.event_interval(interval, 0.05) guide.show() guide_text.set_text(" Use the websites linked in the box to the left \nto explore more cybersecurity jobs,\n\n\n\n\n") guide_text.show() stage.wait(wait_time*2) guide_text.set_text("Use the websites linked in the box to the left\nto explore more cybersecurity jobs,\nthe skills and education needed, average salary, and more!\n\n\n\n") stage.wait(wait_time*2) guide_text.set_text("Use the websites linked in the box to the left\nto explore more cybersecurity jobs,\nthe skills and education needed, average salary, and more!\n\nCybersecurity Ventures estimates that there will be\n3.5 million cybersecurity job openings in 2025.\n") stage.wait(wait_time*2) guide_text.set_text("Use the websites linked in the box to the left\nto explore more cybersecurity jobs,\nthe skills and education needed, average salary, and more!\n\nCybersecurity Ventures estimates that there will be\n3.5 million cybersecurity job openings in 2025.\nIs one of those jobs waiting for you?") stage.wait(wait_time*5) sprite_list = demo.remind_student_to_submit(guide.get_x() - 175, guide.get_y() + 165, 25) for sprite in sprite_list: if sprite.get_name() == 'line' or sprite.get_name() == 'arrowLine': sprite.set_color("white") elif sprite.get_text() != None: sprite.set_color("white") tester = TestManager() tester.display_success_message("Great job!") stage.wait(10) stage.event_interval(interval, None) for char in chars: char.set_y_speed(0)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)